package com.project.fiveCerealsSavoury.service;

import java.util.List;

import com.project.fiveCerealsSavoury.domain.Address;
import com.project.fiveCerealsSavoury.exception.BizException;
import com.project.fiveCerealsSavoury.transfer.AddressSet;

public interface AddressService {
	/**
	 * 添加用户收货地址
	 * @param address
	 * @return
	 */
	public boolean add(Address address) throws BizException;
	
	/**
	 * 根据用户ID查询地址
	 * @param userId
	 * @return
	 */
	public List<Address> queryList(Integer userId) throws BizException;
	
	public Address query(Integer id) throws BizException;
	/**
	 * 修改
	 * @param userId
	 * @param newAddress
	 * @return
	 */
	public void modify(AddressSet addressSet) throws BizException;
	
	/**
	 * 删除
	 * @param userId
	 * @return
	 */
	public Integer remove(Integer id) throws BizException;
	
	/**
	 * 根据地址ID查询地址
	 * @param userId
	 * @return
	 */
	public Address queryAddress(Integer id)throws BizException;
}
